package com.dongbo.recorder.screenrecord.ui.activity;

import android.os.Handler;
import android.text.TextUtils;
import android.view.View;
import android.widget.EditText;
import android.widget.Toast;

import com.dongbo.recorder.screenrecord.R;
import com.dongbo.recorder.screenrecord.base.BaseActivity;


/**
 * author hedong
 * <p>
 * description 反馈
 * <p>
 * createTime 2023/2/19 19:37
 **/
public class FeedbackActivity extends BaseActivity {

    @Override
    public void initData() {

    }

    @Override
    protected void initListener() {

    }

    @Override
    protected int getLayout() {
        return R.layout.activity_feedback;
    }

    @Override
    public void initView() {
        findViewById(R.id.iv_back).setOnClickListener(new View.OnClickListener() {
            @Override
            public void onClick(View v) {
                finish();
            }
        });

        findViewById(R.id.tvCommit).setOnClickListener(new View.OnClickListener() {
            @Override
            public void onClick(View v) {
                EditText text = findViewById(R.id.edtInput);
                if (!TextUtils.isEmpty(text.getText().toString().trim())) {
                    Toast.makeText(FeedbackActivity.this, "感谢您的反馈", Toast.LENGTH_SHORT).show();
                    new Handler().postDelayed(() -> finish(), 500);
                }else {
                    Toast.makeText(FeedbackActivity.this, "请输入反馈问题", Toast.LENGTH_SHORT).show();
                }
            }
        });
    }

}
